import request from "@/utils/request";

const {
  get: $get,
  post: $post,
  delete: $delete,
  download: $download,
  post_query: $post_query,
} = request;

/** 新增
 * @param { import("@/types/BizLeaveAdd").BizLeaveAdd } p 请假表单 实体类
 */
export const add = (p) => request.post(`/activiti/bizLeave/add`, p);

// 新增
// export const add = data =>{
//   return $post('/activiti/bizLeave/add', data)
// }

// 更新
export const update = (data) => {
  return $post("/activiti/bizLeave/update", data);
};

// 删除
export const deleteInfo = (data) => {
  return $post("/activiti/bizLeave/delete", data);
};

// 提交
export const submit = (id) => {
  return $post("/activiti/bizLeave/submitApply/" + id);
};

// 列表
export const list = (data) => {
  return $get("/activiti/bizLeave/list", data);
};

// 详情
export const detail = (data) => {
  return $get("/activiti/bizLeave/detail", data);
};
